package com.tau.iplayer.client.dialogs;

import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.StackPanel;

public class HelpDialog extends DialogBox {
	
	private static final boolean IS_AUTO_HIDE = true;
	private static final boolean IS_MODAL = true;
	private static final boolean IS_ANIMATED = true;
	private static final boolean IS_GLASS = true;
	private static final String HEADER = "Help";
	
	private static final String CREATE_PLAYLIST_INFO = "In the playlist tab, click on the selection box \"Select Playlist\". Then, click on \"New...\" and add a new playlist.";
	private static final String SEARCH_INFO = "You can use the search box at the top of the screen to search for songs or add a song to the current playlist, with an \"I'm feeling lucky\" search.";
	private static final String ADD_SONG_INFO = "If you chose to search for songs, the results will appear in the search tab. You can click the song you would like to preview, and then select the playlist you would like to add that song to.";
	private static final String MORE_INFO = "After you added the song, return to the playlist tab and start enjoying your music.\n" +
			"iPlayer has a lot of fun features which are not explained in this tutorial, such as sharing songs with friends. Don't forget to check out the Community tab.";
	
	public HelpDialog() {
		
		setAutoHideEnabled(IS_AUTO_HIDE);
		setModal(IS_MODAL);
		setAnimationEnabled(IS_ANIMATED);
		setGlassEnabled(IS_GLASS);
		setText(HEADER);
		
		StackPanel panel = new StackPanel();
		panel.add(new HTML(CREATE_PLAYLIST_INFO, true), "<font size='2'>Create a new playlist</font>", true);
		panel.add(new HTML(SEARCH_INFO, true), "<font size='2'>Search for songs</font>", true);
		panel.add(new HTML(ADD_SONG_INFO, true), "<font size='2'>Add songs to the playlist</font>", true);
		panel.add(new HTML(MORE_INFO, true), "<font size='2'>Enjoy your music</font>", true);
		
		setWidget(panel);
	}

}
